"""
WSGI config for {project_name} project.

It exposes the WSGI callable as a module-level variable named ``application``.

For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application
from core.general.serviceInspection import inspection
from core.config import INSPECTION_CONF
from core.log import logging
os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{project_name}.settings')

state,result= inspection(INSPECTION_CONF)
if state:
    for item in result:
        logging.info("%s %s %s %s"%(item["name"],item["uri"],item["code"],item["msg"]))
    application = get_wsgi_application()
else:
    for item in result:
        logging.error("%s %s %s %s"%(item["name"],item["uri"],item["code"],item["msg"]))
